//https://leetcode.cn/problems/XltzEq/description/

#include <iostream>
#include <vector>
#include <memory>
#include <string>

using namespace std;

class Solution {
public:
  bool isPalindrome(string s) {
    std::string filter_str;
    for(auto ch:s) {
      if (isalnum(ch)) {
        filter_str += tolower(ch);
      }
    }
    int left = 0;
    int right = filter_str.size()-1;
    while (left < right) {
      if (filter_str[left] != filter_str[right]) {
        return false;
      }
      ++left;
      --right;
    }
  }
};


int main() {
  std::cout << Solution().isPalindrome("123321") << std::endl;
  return 0;
}